package com.gwtgeo.ui.shared.event;

import java.util.List;

import com.google.gwt.event.shared.GwtEvent;
import com.gwtgeo.service.model.Location;

public class SearchFinishedEvent extends GwtEvent<SearchFinishedEventHandler>{

	public static Type<SearchFinishedEventHandler> TYPE = new Type<SearchFinishedEventHandler>();
	
	private List<Location> locations;
	
	public SearchFinishedEvent() {
		super();
	}
	
	public SearchFinishedEvent(List<Location> locations) {
		super();
		this.locations = locations;
	}

	@Override
	protected void dispatch(SearchFinishedEventHandler handler) {
		handler.onSearchFinished(this);
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<SearchFinishedEventHandler> getAssociatedType() {
		return SearchFinishedEvent.TYPE;
	}

	public List<Location> getLocations() {
		return locations;
	}
}
